Skip to content

Require documentation for exported variables#437

Draft
mcmire wants to merge 1 commit intoloosen-jsdoc-rulesfrom
require-exported-variables-to-be-docd
Draft

Require documentation for exported variables#437
mcmire wants to merge 1 commit intoloosen-jsdoc-rulesfrom
require-exported-variables-to-be-docd

Conversation

@mcmire
Copy link
Copy Markdown
Contributor

@mcmire mcmire commented Apr 1, 2026

It's common in various repos to define a function or constant value, assign it to a variable, and export it in one go:

export const POLLING_INTERVAL = 30 * 1000;

export const Banner = () => {
  return (
    <div>
      {/* ... */}
    </div>
  )
};

Exporting these variables signifies they are important in some way, and so we want them to be documented for other engineers.

While the second case is already covered by a selector added in a previous commit, the first case is not. This commit corrects that.

It's common in various repos to define a function or constant value,
assign it to a variable, and export it in one go:

```typescript
export const POLLING_INTERVAL = 30 * 1000;

export const Banner = () => {
  return (
    <div>
      {/* ... */}
    </div>
  )
};
```

Exporting these variables signifies they are important in some way, and
so we want them to be documented for other engineers.

While the second case is already covered by a selector added in a
previous commit, the first case is not. This commit corrects that.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant